﻿@model Core.Models.LogOnModel

@{
    ViewBag.Title = "Log On";
    Layout = ((Core.Models.Theme)Session["Theme"]).Layout;
    string formAction = "LogOn";
}

<h1>Log on</h1>
<p>&nbsp;</p>
@Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.")
@using (Html.BeginForm(formAction, "Account", FormMethod.Post, new { @id = "openidform", @class = "openid" }))
{
    @Html.Hidden("ReturnUrl", Request.QueryString.AllKeys.Where(m => m.Equals("ReturnUrl")).Count() > 0 ? Request.QueryString["ReturnUrl"].ToString() : "");
    <div style="float: left">
        <h2>Using OpenID</h2>
        <div><ul class="providers"> 
        <li class="openid" title="OpenID"><img src="/Content/Images/openidW.png" alt="icon" /> 
        <span><strong>http://{your-openid-url}</strong></span></li> 
        <li class="direct" title="Google"> 
	        <img src="/Content/Images/googleW.png" alt="icon" /><span>https://www.google.com/accounts/o8/id</span></li> 
        <li class="direct" title="Yahoo"> 
	        <img src="/Content/Images/yahooW.png" alt="icon" /><span>http://yahoo.com/</span></li> 
        <li class="username" title="AOL screen name"> 
	        <img src="/Content/Images/aolW.png" alt="icon" /><span>http://openid.aol.com/<strong>username</strong></span></li> 
        <li class="username" title="MyOpenID user name"> 
	        <img src="/Content/Images/myopenid.png" alt="icon" /><span>http://<strong>username</strong>.myopenid.com/</span></li> 
        <li class="username" title="Flickr user name"> 
	        <img src="/Content/Images/flickr.png" alt="icon" /><span>http://flickr.com/<strong>username</strong>/</span></li> 
        <li class="username" title="Technorati user name"> 
	        <img src="/Content/Images/technorati.png" alt="icon" /><span>http://technorati.com/people/technorati/<strong>username</strong>/</span></li> 
        <li class="username" title="Wordpress blog name"> 
	        <img src="/Content/Images/wordpress.png" alt="icon" /><span>http://<strong>username</strong>.wordpress.com</span></li> 
        <li class="username" title="Blogger blog name"> 
	        <img src="/Content/Images/blogger.png" alt="icon" /><span>http://<strong>username</strong>.blogspot.com/</span></li> 
        <li class="username" title="LiveJournal blog name"> 
	        <img src="/Content/Images/livejournal.png" alt="icon" /><span>http://<strong>username</strong>.livejournal.com</span></li> 
        <li class="username" title="ClaimID user name"> 
	        <img src="/Content/Images/claimid.png" alt="icon" /><span>http://claimid.com/<strong>username</strong></span></li> 
        <li class="username" title="Vidoop user name"> 
	        <img src="/Content/Images/vidoop.png" alt="icon" /><span>http://<strong>username</strong>.myvidoop.com/</span></li> 
        <li class="username" title="Verisign user name"> 
	        <img src="/Content/Images/verisign.png" alt="icon" /><span>http://<strong>username</strong>.pip.verisignlabs.com/</span></li> 
        </ul></div> 
        <fieldset>
        <label for="openid_username">Enter your <span>Provider user name</span></label> 
        <div>
            <span></span><input type="text" name="openid_username" /> 
            <input type="submit" name="logon1" value="Log On" />
        </div>
        </fieldset> 
        <fieldset> 
        <label for="openid_identifier">Enter your <a class="openid_logo" href="http://openid.net">OpenID</a></label> 
        <div class="editor-field">
            @Html.TextBoxFor(m => m.openid_identifier)
            @Html.ValidationMessageFor(m => m.openid_identifier)
            <input type="submit" name="logon3" value="Log On" />
        </div>
        </fieldset>
    </div>        
}
<!--
<div style="float: left">
    <h3>- Or -</h3>
</div>
-->
@using (Html.BeginForm(formAction, "Account", FormMethod.Post, new { @id = "memberform", @class = "openid" }))
{
    @Html.Hidden("ReturnUrl", Request.QueryString.AllKeys.Where(m => m.Equals("ReturnUrl")).Count() > 0 ? Request.QueryString["ReturnUrl"].ToString() : "");
    <div style="float:left">
        <h2>Using Member Account</h2>
        <fieldset style="padding: 10px">
            <div class="editor-label">                
                @Html.LabelFor(m => m.Email)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Email)
                @Html.ValidationMessageFor(m => m.Email)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>

            <div class="editor-label">
                @Html.CheckBoxFor(m => m.RememberMe)
                @Html.LabelFor(m => m.RememberMe)
            </div>
            <p>
                <br />
                <input type="submit" name="logon2" value="Log On" />&nbsp;&nbsp;&nbsp;
                @Html.ActionLink("Forgot Password", "ResetPasswordEmail")
            </p>
        </fieldset>
    </div>
}
<div style="clear: both"></div>
@{
    if (Session["EnableSelfRegisterYN"].ToString() == "Y")
    {
    <div id="SelfRegister">
    @using (Html.BeginForm("Create", "Account", FormMethod.Post, new { id = "create" }))
    {
        <p><strong>If you do not have an account you are welcome to create a new account</strong></p>
        <input type="submit" name="create" value="Create New Account" />
    }
    </div>
    }
}
<script type="text/javascript" src="@Url.Content("/Scripts/jquery.openid.js")"></script>
<script type="text/javascript">
    $(function () {
        $("#openidform").openid();
    });
</script>
<!--
<script type="text/javascript">    $(function () { $("form.openid:eq(0)").openid(); });</script>
-->